package com.ruoyi.web.service.impl;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.web.mapper.DemoTestMapper;
import com.ruoyi.web.service.DemoTestService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service

public class DemoTestServiceImpl implements DemoTestService {
    private static final Logger log = LoggerFactory.getLogger(DemoTestServiceImpl.class);

    @Autowired
    private DemoTestMapper demoTestMapper;

    @Override
    @DataSource(DataSourceType.SLAVE)
    public String getUser() {

        log.info("========getUser==========");


        return demoTestMapper.getUser();


    }

    @Override
    public String getHrmResource() {
        return demoTestMapper.getHrmResource();
    }
}
